<template>
  <div id="equipContrast">
    <div class="equipNav clearfix">
      <div class="leftTop">
        <p class="leftTitle">设备对比</p>
      </div>
      <div class="rightBtn" @click="goBack()">
        < 返回
      </div>
    </div>
    <div class="addEquip">
      <ul class="clearfix">
        <li class="contrastTitle">
          <p>设备编号</p>
          <span>- 无</span>
        </li>
        <li class="contrastContent">
          <p v-if="picture !== ''"><img :src="picture"></p>
          <p v-if="picture === ''"></p>
          <span class="contentCid">{{constrast.equip_cid}}</span>
        </li>
        <li class="contrastContent">
          <i v-for="item in constrast0" v-show="constrast0.cid !== ''" class="el-icon-close" @click="clearconstrastZeor()"></i>
          <p v-if="picture0 !== ''"><img :src="picture0"></p>
          <p v-if="picture0 === ''"></p>
          <span class="contentCid">{{constrast0.equip_cid}}</span>
        </li>
        <li class="contrastContent">
          <i v-for="item in constrast1" v-show="constrast1.cid !== ''" class="el-icon-close" @click="clearconstrastOne()"></i>
          <p v-if="picture1 !== ''"><img :src="picture1"></p>
          <p v-if="picture1 === ''"></p>
          <span class="contentCid">{{constrast1.equip_cid}}</span>
        </li>
        <li class="contrastContent">
          <i v-for="item in constrast2" v-show="constrast2.cid !== ''" class="el-icon-close" @click="clearconstrastTwo()"></i>
          <p v-if="picture2 !== ''"><img :src="picture2"></p>
          <p v-if="picture2 === ''"></p>
          <span class="contentCid">{{constrast2.equip_cid}}</span>
        </li>
        <li class="contrastContent">
          <i v-for="item in constrast3" v-show="constrast3.cid !== ''" class="el-icon-close" @click="clearconstrastTree()"></i>
          <p v-if="picture3 !== ''"><img :src="picture3"></p>
          <p v-if="picture3 === ''"></p>
          <span class="contentCid">{{constrast3.equip_cid}}</span>
        </li>
        <li class="contrastContent">
          <i v-for="item in constrast4" v-show="constrast4.cid !== ''" class="el-icon-close" @click="clearconstrastFour()"></i>
          <p v-if="picture4 !== ''"><img :src="picture4"></p>
          <p v-if="picture4 === ''"></p>
          <span class="contentCid">{{constrast4.equip_cid}}</span>
        </li>
      </ul>
      <el-button class="contrastAdd" @click="showDialog()">添加设备</el-button>
    </div>
    <div class="contrastTable">
      <el-tabs v-model="activeName" @tab-click="handleClick">
        <el-tab-pane label="配置参数" name="first">
          <div class="viewContent">
            <p style="color: #323842; font-weight:bold; font-size:14px; font-family:MicrosoftYaHei-Bold;">基本参数</p>
            <table>
              <tr>
                <th>品牌</th>
                <td>{{constrast.brand_label}}</td>
                <td>{{constrast0.brand_label}}</td>
                <td>{{constrast1.brand_label}}</td>
                <td>{{constrast2.brand_label}}</td>
                <td>{{constrast3.brand_label}}</td>
                <td>{{constrast4.brand_label}}</td>
              </tr>
              <tr>
                <th>类型</th>
                <td>{{constrast.type_label}}</td>
                <td>{{constrast0.type_label}}</td>
                <td>{{constrast1.type_label}}</td>
                <td>{{constrast2.type_label}}</td>
                <td>{{constrast3.type_label}}</td>
                <td>{{constrast4.type_label}}</td>
              </tr>
              <tr>
                <th>型号</th>
                <td>{{constrast.model}}</td>
                <td>{{constrast0.model}}</td>
                <td>{{constrast1.model}}</td>
                <td>{{constrast2.model}}</td>
                <td>{{constrast3.model}}</td>
                <td>{{constrast4.model}}</td>
              </tr>
              <tr>
                <th>操作方式</th>
                <td>{{constrast.operation_mode_label}}</td>
                <td>{{constrast0.operation_mode_label}}</td>
                <td>{{constrast1.operation_mode_label}}</td>
                <td>{{constrast2.operation_mode_label}}</td>
                <td>{{constrast3.operation_mode_label}}</td>
                <td>{{constrast4.operation_mode_label}}</td>
              </tr>
              <tr>
                <th>结构形式</th>
                <td>{{constrast.structure}}</td>
                <td>{{constrast0.structure}}</td>
                <td>{{constrast1.structure}}</td>
                <td>{{constrast2.structure}}</td>
                <td>{{constrast3.structure}}</td>
                <td>{{constrast4.structure}}</td>
              </tr>
              <tr>
                <th>工作级别</th>
                <td>{{constrast.work_level_label}}</td>
                <td>{{constrast0.work_level_label}}</td>
                <td>{{constrast1.work_level_label}}</td>
                <td>{{constrast2.work_level_label}}</td>
                <td>{{constrast3.work_level_label}}</td>
                <td>{{constrast4.work_level_label}}</td>
              </tr>
              <tr>
                <th>跨度(m)</th>
                <td>{{constrast.span}}</td>
                <td>{{constrast0.span}}</td>
                <td>{{constrast1.span}}</td>
                <td>{{constrast2.span}}</td>
                <td>{{constrast3.span}}</td>
                <td>{{constrast4.span}}</td>
              </tr>
              <tr>
                <th>大车轨道长度(m)</th>
                <td>{{constrast.big_car_track_length}}</td>
                <td>{{constrast0.big_car_track_length}}</td>
                <td>{{constrast1.big_car_track_length}}</td>
                <td>{{constrast2.big_car_track_length}}</td>
                <td>{{constrast3.big_car_track_length}}</td>
                <td>{{constrast4.big_car_track_length}}</td>
              </tr>
              <tr>
                <th>大车轨道型号</th>
                <td>{{constrast.big_car_track_model}}</td>
                <td>{{constrast0.big_car_track_model}}</td>
                <td>{{constrast1.big_car_track_model}}</td>
                <td>{{constrast2.big_car_track_model}}</td>
                <td>{{constrast3.big_car_track_model}}</td>
                <td>{{constrast4.big_car_track_model}}</td>
              </tr>
              <tr>
                <th>起升高度(m)</th>
                <td>{{constrast.lifting_height}}</td>
                <td>{{constrast0.lifting_height}}</td>
                <td>{{constrast1.lifting_height}}</td>
                <td>{{constrast2.lifting_height}}</td>
                <td>{{constrast3.lifting_height}}</td>
                <td>{{constrast4.lifting_height}}</td>
              </tr>
              <tr>
                <th>额定功率(kW)</th>
                <td>{{constrast.whole_rated_power}}</td>
                <td>{{constrast0.whole_rated_power}}</td>
                <td>{{constrast1.whole_rated_power}}</td>
                <td>{{constrast2.whole_rated_power}}</td>
                <td>{{constrast3.whole_rated_power}}</td>
                <td>{{constrast4.whole_rated_power}}</td>
              </tr>
              <tr>
                <th>主起升机构功率(kW)</th>
                <td>{{liftingPower}}</td>
                <td>{{liftingPower0}}</td>
                <td>{{liftingPower1}}</td>
                <td>{{liftingPower2}}</td>
                <td>{{liftingPower3}}</td>
                <td>{{liftingPower4}}</td>
              </tr>
              <tr>
                <th>主起升机构电流(kW)</th>
                <td>{{liftingCurrent}}</td>
                <td>{{liftingCurrent0}}</td>
                <td>{{liftingCurrent1}}</td>
                <td>{{liftingCurrent2}}</td>
                <td>{{liftingCurrent3}}</td>
                <td>{{liftingCurrent4}}</td>
              </tr>
              <tr>
                <th>主起升机构速度(kW)</th>
                <td>{{liftingSpeed}}</td>
                <td>{{liftingSpeed0}}</td>
                <td>{{liftingSpeed1}}</td>
                <td>{{liftingSpeed2}}</td>
                <td>{{liftingSpeed3}}</td>
                <td>{{liftingSpeed4}}</td>
              </tr>
              <tr>
                <th>主起升机构重量(kW)</th>
                <td>{{liftingWeight}}</td>
                <td>{{liftingWeight0}}</td>
                <td>{{liftingWeight1}}</td>
                <td>{{liftingWeight2}}</td>
                <td>{{liftingWeight3}}</td>
                <td>{{liftingWeight4}}</td>
              </tr>
              <tr>
                <th>小车机构功率(kW)</th>
                <td>{{smallCarPower}}</td>
                <td>{{smallCarPower0}}</td>
                <td>{{smallCarPower1}}</td>
                <td>{{smallCarPower2}}</td>
                <td>{{smallCarPower3}}</td>
                <td>{{smallCarPower4}}</td>
              </tr>
              <tr>
                <th>小车机构电流(A)</th>
                <td>{{smallCarCurrent}}</td>
                <td>{{smallCarCurrent0}}</td>
                <td>{{smallCarCurrent1}}</td>
                <td>{{smallCarCurrent2}}</td>
                <td>{{smallCarCurrent3}}</td>
                <td>{{smallCarCurrent4}}</td>
              </tr>
              <tr>
                <th>小车机构运行速度(m/min)</th>
                <td>{{smallCarSpeed}}</td>
                <td>{{smallCarSpeed0}}</td>
                <td>{{smallCarSpeed1}}</td>
                <td>{{smallCarSpeed2}}</td>
                <td>{{smallCarSpeed3}}</td>
                <td>{{smallCarSpeed4}}</td>
              </tr>
              <tr>
                <th>大车机构功率(kW)</th>
                <td>{{bigCarPower}}</td>
                <td>{{bigCarPower0}}</td>
                <td>{{bigCarPower1}}</td>
                <td>{{bigCarPower2}}</td>
                <td>{{bigCarPower3}}</td>
                <td>{{bigCarPower4}}</td>
              </tr>
              <tr>
                <th>大车机构电流(A)</th>
                <td>{{bigCarCurrent}}</td>
                <td>{{bigCarCurrent0}}</td>
                <td>{{bigCarCurrent1}}</td>
                <td>{{bigCarCurrent2}}</td>
                <td>{{bigCarCurrent3}}</td>
                <td>{{bigCarCurrent4}}</td>
              </tr>
              <tr>
                <th>大车机构运行速度(m/min)</th>
                <td>{{bigCarSpeed}}</td>
                <td>{{bigCarSpeed0}}</td>
                <td>{{bigCarSpeed1}}</td>
                <td>{{bigCarSpeed2}}</td>
                <td>{{bigCarSpeed3}}</td>
                <td>{{bigCarSpeed4}}</td>
              </tr>
              <tr>
                <th>安装位置</th>
                <td>{{constrast.install_position}}</td>
                <td>{{constrast0.install_position}}</td>
                <td>{{constrast1.install_position}}</td>
                <td>{{constrast2.install_position}}</td>
                <td>{{constrast3.install_position}}</td>
                <td>{{constrast4.install_position}}</td>
              </tr>
              <tr>
                <th>适用范围</th>
                <td>{{constrast.range}}</td>
                <td>{{constrast0.range}}</td>
                <td>{{constrast1.range}}</td>
                <td>{{constrast2.range}}</td>
                <td>{{constrast3.range}}</td>
                <td>{{constrast4.range}}</td>
              </tr>
              <tr>
                <th>制造商</th>
                <td>{{constrast.manufacturer}}</td>
                <td>{{constrast0.manufacturer}}</td>
                <td>{{constrast1.manufacturer}}</td>
                <td>{{constrast2.manufacturer}}</td>
                <td>{{constrast3.manufacturer}}</td>
                <td>{{constrast4.manufacturer}}</td>
              </tr>
              <tr>
                <th>所属项目</th>
                <td>{{constrast.project}}</td>
                <td>{{constrast0.project}}</td>
                <td>{{constrast1.project}}</td>
                <td>{{constrast2.project}}</td>
                <td>{{constrast3.project}}</td>
                <td>{{constrast4.project}}</td>
              </tr>
              <tr>
                <th>所属用户</th>
                <td>{{constrast.user_name}}</td>
                <td>{{constrast0.user_name}}</td>
                <td>{{constrast1.user_name}}</td>
                <td>{{constrast2.user_name}}</td>
                <td>{{constrast3.user_name}}</td>
                <td>{{constrast4.user_name}}</td>
              </tr>
              <tr>
                <th>所属车间</th>
                <td>{{constrast.workshop}}</td>
                <td>{{constrast0.workshop}}</td>
                <td>{{constrast1.workshop}}</td>
                <td>{{constrast2.workshop}}</td>
                <td>{{constrast3.workshop}}</td>
                <td>{{constrast4.workshop}}</td>
              </tr>
              <tr>
                <th>出厂日期</th>
                <td>{{constrast.produce_date}}</td>
                <td>{{constrast0.produce_date}}</td>
                <td>{{constrast1.produce_date}}</td>
                <td>{{constrast2.produce_date}}</td>
                <td>{{constrast3.produce_date}}</td>
                <td>{{constrast4.produce_date}}</td>
              </tr>
              <tr>
                <th>保修期限(月)</th>
                <td>{{constrast.defects_liability_period}}</td>
                <td>{{constrast0.defects_liability_period}}</td>
                <td>{{constrast1.defects_liability_period}}</td>
                <td>{{constrast2.defects_liability_period}}</td>
                <td>{{constrast3.defects_liability_period}}</td>
                <td>{{constrast4.defects_liability_period}}</td>
              </tr>
              <tr>
                <th>厂家服务电话</th>
                <td>{{constrast.produce}}</td>
                <td>{{constrast0.produce}}</td>
                <td>{{constrast1.produce}}</td>
                <td>{{constrast2.produce}}</td>
                <td>{{constrast3.produce}}</td>
                <td>{{constrast4.produce}}</td>
              </tr>
              <tr>
                <th>交付使用或取证事件</th>
                <td>{{constrast.delivery_time}}</td>
                <td>{{constrast0.delivery_time}}</td>
                <td>{{constrast1.delivery_time}}</td>
                <td>{{constrast2.delivery_time}}</td>
                <td>{{constrast3.delivery_time}}</td>
                <td>{{constrast4.delivery_time}}</td>
              </tr>
              <tr>
                <th>使用登记编号</th>
                <td>{{constrast.register_number}}</td>
                <td>{{constrast0.register_number}}</td>
                <td>{{constrast1.register_number}}</td>
                <td>{{constrast2.register_number}}</td>
                <td>{{constrast3.register_number}}</td>
                <td>{{constrast4.register_number}}</td>
              </tr>
              <tr>
                <th>下次年审时间</th>
                <td>{{constrast.next_annual_trial}}</td>
                <td>{{constrast0.next_annual_trial}}</td>
                <td>{{constrast1.next_annual_trial}}</td>
                <td>{{constrast2.next_annual_trial}}</td>
                <td>{{constrast3.next_annual_trial}}</td>
                <td>{{constrast4.next_annual_trial}}</td>
              </tr>
              <tr>
                <th>设备价格</th>
                <td>{{constrast.equip_price}}</td>
                <td>{{constrast0.equip_price}}</td>
                <td>{{constrast1.equip_price}}</td>
                <td>{{constrast2.equip_price}}</td>
                <td>{{constrast3.equip_price}}</td>
                <td>{{constrast4.equip_price}}</td>
              </tr>
              <tr>
                <th>设备负责人</th>
                <td>{{constrast.equip_person_liable}}</td>
                <td>{{constrast0.equip_person_liable}}</td>
                <td>{{constrast1.equip_person_liable}}</td>
                <td>{{constrast2.equip_person_liable}}</td>
                <td>{{constrast3.equip_person_liable}}</td>
                <td>{{constrast4.equip_person_liable}}</td>
              </tr>
              <tr>
                <th>行业类别</th>
                <td>{{constrast.industry_type_label}}</td>
                <td>{{constrast0.industry_type_label}}</td>
                <td>{{constrast1.industry_type_label}}</td>
                <td>{{constrast2.industry_type_label}}</td>
                <td>{{constrast3.industry_type_label}}</td>
                <td>{{constrast4.industry_type_label}}</td>
              </tr>
              <tr>
                <th>服务商名称</th>
                <td>{{constrast.service_provider}}</td>
                <td>{{constrast0.service_provider}}</td>
                <td>{{constrast1.service_provider}}</td>
                <td>{{constrast2.service_provider}}</td>
                <td>{{constrast3.service_provider}}</td>
                <td>{{constrast4.service_provider}}</td>
              </tr>
              <tr>
                <th>服务商联系人</th>
                <td>{{constrast.service_contacts}}</td>
                <td>{{constrast0.service_contacts}}</td>
                <td>{{constrast1.service_contacts}}</td>
                <td>{{constrast2.service_contacts}}</td>
                <td>{{constrast3.service_contacts}}</td>
                <td>{{constrast4.service_contacts}}</td>
              </tr>
              <tr>
                <th>服务商联系电话</th>
                <td>{{constrast.service_tel}}</td>
                <td>{{constrast0.service_tel}}</td>
                <td>{{constrast1.service_tel}}</td>
                <td>{{constrast2.service_tel}}</td>
                <td>{{constrast3.service_tel}}</td>
                <td>{{constrast4.service_tel}}</td>
              </tr>
              <tr>
                <th>备注</th>
                <td>{{constrast.remark}}</td>
                <td>{{constrast0.remark}}</td>
                <td>{{constrast1.remark}}</td>
                <td>{{constrast2.remark}}</td>
                <td>{{constrast3.remark}}</td>
                <td>{{constrast4.remark}}</td>
              </tr>
            </table>
          </div>
        </el-tab-pane>
        <el-tab-pane label="统计数据" name="second">
          <div class="viewContent">
          </div>
        </el-tab-pane>
      </el-tabs>
    </div>
    <div class="addDialog">
      <el-dialog title="选择设备" :visible.sync="dialogTableVisible" :before-close="handleClose">
        <el-form :inline="true"  class="demo-form-inline" style="height: 40px" size="mini" >
          <el-form-item label="出厂编号:">
            <el-input v-model="equipPid"></el-input>
          </el-form-item>
          <el-form-item label="名称:">
            <el-select v-model="equipName" clearable placeholder="所有类型">
              <el-option
                v-for="item in nameoptions"
                :key="item.value"
                :label="item.label"
                :value="item.value">
              </el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="分类:">
            <el-select v-model="equipType" clearable placeholder="所有类型">
              <el-option
                v-for="item in cranetypeoptions"
                :key="item.value"
                :label="item.label"
                :value="item.value">
              </el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="品牌:">
            <el-select v-model="equipBrand" clearable placeholder="请选择">
              <el-option
                v-for="item in brandoptions"
                :key="item.value"
                :label="item.label"
                :value="item.value">
              </el-option>
            </el-select>
          </el-form-item>
          <el-form-item  style="margin-right: 6px">
            <el-button type="primary" @click="equipSearch()">查询</el-button>
          </el-form-item>
        </el-form>
        <el-table
          :data="tableData"
          ref="contrastTable"
          stripe border fit highlight-current-row
          @select="toggleRowSelection"
          @select-all="toggleRowSelectionAll"
          style="width: 100%;height: 517px; max-height: 517px; overflow-y: auto"
          height="517"
          :header-cell-style="{background:'#D8DEE8',height: '20px',padding:'5px 0px'}"
        >
          <el-table-column
            type="selection"
            width="40">
          </el-table-column>
          <el-table-column
            type="index"
            label="序号"
            align="center"
            width="60px"
          >
          </el-table-column>
          <el-table-column
            v-for="(column, index) in cols"
            :prop="column.prop"
            :label="column.label"
            :key="index"
            :show-overflow-tooltip="true"
            :width="column.width"
            :sortable="column.sortable"
          >
          </el-table-column>
        </el-table>
        <div class="pagination-container footerPage">
          <el-pagination
            @current-change="CurrentChange"
            @size-change="SizeChange"
            :page-sizes="[5, 10, 20, 50]"
            background layout="total, sizes, prev, pager, next"
            :total="total">
          </el-pagination>
        </div>
        <div class="equipFooter">
          <el-button :disabled="this.btndisable" type="primary" @click="confirmAdd()">确定</el-button>
          <el-button type="primary" @click="cancelAdd()" >取消</el-button>
        </div>
      </el-dialog>
    </div>
  </div>
</template>

<style rel="stylesheet/scss" lang="scss" scoped>
  /***********before删除************/
  /deep/ .el-icon-close{
    position: absolute;
    right: 0;
    background: #ccc;
    cursor: pointer;
  }
  /deep/ .el-icon-close:before{
    color: #fff;
  }
  /**********清除浮动*********/
  .clearfix:after{
    content: '';
    display: block;
    clear: both;
  }
  /**********抬头样式*********/
  .equipNav {
    width: 1700px;
    height: 60px;
    margin: 0 0 0 20px;
    border-bottom: 1px solid #E8E8E8;
  }
  .leftTop {
    width: 50%;
    height: 60px;
    float: left;
    font-size: 16px;
    font-family: MicrosoftYaHei;
    font-weight: 400;
    color: rgba(50, 56, 66, 1);
  }
  .leftTitle{
    font-size: 16px;
    color: #676A70;
    padding-left: 5px;
    border-left: 5px solid #25B6C7;
  }
  .rightBtn{
    float: right;
    font-size:14px;
    font-family:MicrosoftYaHei;
    font-weight:400;
    color:rgba(37,183,200,1);
    cursor: pointer;
    margin: 20px 0 0 0;
  }
  /**********初始化及列表样式*********/
  .addEquip{
    position: relative;
    max-width: 1700px;
    height: 160px;
    margin: 20px 0 0 20px ;
    border: 1px solid #E8E8E8;
  }
  ul{
    margin: 0;
    padding: 0;
  }
  li.contrastTitle{
    width: 240px;
    height: 158px;
    float: left;
    list-style: none;
    background-color: #F0F2F7;
    border-right: 1px solid #E8E8E8;
  }
  li.contrastContent{
    width: 240px;
    height: 158px;
    position: relative;
    float: left;
    list-style: none;
    border-right: 1px solid #E8E8E8;
  }
  .contrastAdd{
    white-space: normal;
    padding: 0;
    width: 20px;
    height: 160px;
    line-height: 2;
    border-left: none;
    border-radius: 0px;
    position: absolute;
    right: -2px;
    top: -1px;
  }
  /************列表内容样式***************/
  .contrastTitle > p{
    height: 120px;
    line-height: 125px;
    margin: 0;
    text-align: center;
    color: #69727E;
  }
  .contrastTitle > span{
    padding-left: 100px;
    font-size: 16px;
    color: #676A70;
    border-left: none;
  }
  .contrastContent > p{
    height: 120px;
    line-height: 125px;
    margin: 0;
    text-align: center;
    color: #69727E;
  }
  .contrastContent > p > img{
    max-width: 230px;
    height: 108px;
    margin-top: 10px;
  }
  .contrastContent > span{
    padding-left: 100px;
    font-size: 16px;
    color: #676A70;
  }
  .contrastContent > span.contentCid{
    padding-left: 55px;
  }
  /***********Tab样式**********/
  .contrastTable{
    width: 1700px;
    height: 50px;
    color: #25B6C7;
    background-color: #F0F3F5;
    margin: 10px 0 0 20px;

  }
  .viewContent{
    width: 100%;
    height: 525px;
    overflow-y: auto;
    /*border: 1px solid red;*/
  }
  /*改变tab颜色*/
  .el-tabs__item:hover {
    color: #27B3C7;
    cursor: pointer;
  }
  .el-tabs__item.is-active {
    color: #27B3C7;
    background-color: #DCEDF1;
  }
  .el-tabs__active-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background-color: #27B3C7;
    z-index: 1;
    -webkit-transition: -webkit-transform .3s cubic-bezier(.645,.045,.355,1);
    transition: -webkit-transform .3s cubic-bezier(.645,.045,.355,1);
    transition: transform .3s cubic-bezier(.645,.045,.355,1);
    transition: transform .3s cubic-bezier(.645,.045,.355,1), -webkit-transform .3s cubic-bezier(.645,.045,.355,1);
    transition: transform .3s cubic-bezier(.645,.045,.355,1),-webkit-transform .3s cubic-bezier(.645,.045,.355,1);
    list-style: none;
  }
  .el-tabs__item {
    padding: 0 20px;
    height: 40px;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    line-height: 40px;
    display: inline-block;
    list-style: none;
    font-size: 14px;
    font-weight: 500;
    color: #303133;
    text-align: center;
    position: relative;
  }
  .el-tabs__item.is-top:last-child {
    padding-right: 18px;
  }
  /***************Tab组件颜色修改*****************/
  /deep/ .el-tabs__item:hover{
    color: #27B3C7;
  }
  /deep/ .el-tabs__item.is-active{
    color: #27B3C7;
    line-height: 50px;
  }
  /deep/ .el-tabs__active-bar{
    height: 4px;
    background-color: #27B3C7;
  }
  /deep/ .el-tabs__nav{
    margin-left: 30px;
    height: 50px;
  }
  /deep/ .el-tabs__nav-wrap{
    height: 50px;
  }
  /***************Tab头部修改*****************/
  /deep/ .el-tabs__header{
    margin: 0 0 2px;
  }
  /*************表格样式************/
  table{
    width: 1680px;
    height: 400px;
    margin: 0;
    padding: 0;
    border-collapse:collapse;
  }
  tr{
    display: inline-block;
    width: inherit;
    height: 40px;
  }
  th{
    width: 240px;
    height: 40px;
    margin: 0;
    padding: 0 20px 0 0;
    color: #69727E;
    font-size: 14px;
    text-align: right;
    font-weight: normal;
    background-color: #F0F2F7;
    border: 1px solid #E8E8E8;
  }
  td{
    width: 240px;
    height: 40px;
    margin: 0;
    padding: 0;
    color: #313740;
    font-size: 14px;
    text-align: center;
    font-weight: normal;
    border: 1px solid #E8E8E8;
  }
  /************弹窗样式*************/
  .footerPage{
    right: 10px;
    bottom: -28px;
    position: absolute;
  }
  /deep/ .el-dialog{
    width: 1050px;
    min-height: 710px;
    margin-top: 90px !important;
    border-radius: 4px;
  }
  /deep/ .el-input__inner{
    padding: 0 12px;
  }
  /deep/ .el-dialog__body{
    padding: 10px 20px;
    position: relative;
  }
  /deep/ .el-dialog > .el-dialog__header{
    width: 1050px;
    height: 39px;
    line-height: 43px;
    padding: 0;
    text-indent: 20px;
    font-weight: bolder;
    border-radius: 4px 4px 0 0;
    background-color: #e3e6ee;
  }
  /deep/ .el-dialog > .el-dialog__header > .el-dialog__headerbtn{
    top: 12px;
  }
  /deep/ .el-dialog > .el-dialog__header > .el-dialog__headerbtn > i{
    font-size: 18px;
    font-weight: bolder;
  }
  /************底部按钮样式************/
  .equipFooter{
    margin-top: 60px;
    float: right;
    width: 169px;
  }
  /deep/ .equipFooter > .el-button{
    padding: 8px 15px;
    width: 80px;
    height: 30px;
  }
  /deep/ .equipFooter > .el-button + .el-button {
    margin-left: 5px;
  }
</style>

<script>
  import axios from 'axios'
  import Axios from 'axios'

  export default {
    data() {
      return {
        contrastform: {
          cid: '',
          produce_number: '',
          type: '',
          operation_mode: '',
          equip_class: '',
          span: '',
          cantilever_length: '',
          name: '',
          brand: '',
          model: '',
          structure: '',
          work_level: '',
          big_car_track_model: '',
          big_car_track_length: '',
          status: '',
          tel: '',
          lifting_height: '',
          lifting_speed: '',
          big_car_speed: '',
          small_car_speed: '',
          rated_weight: '',
          whole_rated_power: '',
          lifting_rated_power: '',
          lifting_rated_current: '',
          lifting_rated: [{
            power: '',
            current: '',
            speed: '',
            weight: ''
          }],
          big_car_rated: [{
            power: '',
            current: '',
            speed: ''
          }],
          small_car_rated: [{
            power: '',
            current: '',
            speed: ''
          }],
          range: '',
          install_position: '',
          manufacturer: '',
          // 时间
          produce_date: '',
          // --------
          defects_liability_period: '',
          produce: '',
          // 时间
          delivery_time: '',
          // --------
          register_number: '',
          // 时间
          next_annual_trial: '',
          // --------
          equip_price: '',
          project: '',
          user_name: '',
          workshop: '',
          equip_person_liable: '',
          industry_type: '',
          service_provider: '',
          service_contacts: '',
          service_tel: '',
          remark: '',
          attachment: []
        },
        // 查询条件
        equipPid: '',
        equipName: '',
        equipBrand: '',
        equipType: '',
        // 下拉框
        nameoptions: [],
        cranetypeoptions: [],
        // classoptions: [],
        brandoptions: [],
        // dialog数据
        cols: [
          { prop: 'equip_cid', label: '出厂编号', width: '160px' },
          { prop: 'name_label', label: '名称', width: '100px' },
          { prop: 'type_label', label: '类型', width: '90px' },
          { prop: 'brand_label', label: '品牌', width: '99px' },
          { prop: 'model', label: '型号', width: '150px' },
          { prop: 'lifting_rated[0].weight', label: '额定起重量', width: '110px' },
          { prop: 'manufacturer', label: '生产商', width: '199px' }
        ],
        tableData: [],
        dialogTableVisible: false,
        activeName: 'first',
        total: 0,
        // 判断长度
        btndisable: false,
        // 添加的设备
        equipAdd: '',
        Add: '',
        // 主起升机构数据
        liftingPower: '',
        liftingCurrent: '',
        liftingSpeed: '',
        liftingWeight: '',
        liftingPower0: '',
        liftingCurrent0: '',
        liftingSpeed0: '',
        liftingWeight0: '',
        liftingPower1: '',
        liftingCurrent1: '',
        liftingSpeed1: '',
        liftingWeight1: '',
        liftingPower2: '',
        liftingCurrent2: '',
        liftingSpeed2: '',
        liftingWeight2: '',
        liftingPower3: '',
        liftingCurrent3: '',
        liftingSpeed3: '',
        liftingWeight3: '',
        liftingPower4: '',
        liftingCurrent4: '',
        liftingSpeed4: '',
        liftingWeight4: '',
        // 大车额定
        bigCarPower: '',
        bigCarCurrent: '',
        bigCarSpeed: '',
        bigCarPower0: '',
        bigCarCurrent0: '',
        bigCarSpeed0: '',
        bigCarPower1: '',
        bigCarCurrent1: '',
        bigCarSpeed1: '',
        bigCarPower2: '',
        bigCarCurrent2: '',
        bigCarSpeed2: '',
        bigCarPower3: '',
        bigCarCurrent3: '',
        bigCarSpeed3: '',
        bigCarPower4: '',
        bigCarCurrent4: '',
        bigCarSpeed4: '',
        // 小车额定
        smallCarPower: '',
        smallCarCurrent: '',
        smallCarSpeed: '',
        smallCarPower0: '',
        smallCarCurrent0: '',
        smallCarSpeed0: '',
        smallCarPower1: '',
        smallCarCurrent1: '',
        smallCarSpeed1: '',
        smallCarPower2: '',
        smallCarCurrent2: '',
        smallCarSpeed2: '',
        smallCarPower3: '',
        smallCarCurrent3: '',
        smallCarSpeed3: '',
        smallCarPower4: '',
        smallCarCurrent4: '',
        smallCarSpeed4: '',
        // 图片显示
        picture: '',
        picture0: '',
        picture1: '',
        picture2: '',
        picture3: '',
        picture4: '',
        // 设备过滤
        cidfilter: [],
        // 顺序传输
        numcids: [],
        // 主对比列
        constrast: {},
        // 对比列1
        constrast0: {},
        // 对比列2
        constrast1: {},
        // 对比列3
        constrast2: {},
        // 对比列4
        constrast3: {},
        // 对比列5
        constrast4: {},
        // 总览接口
        equipDataTable: {
          access_token: localStorage.getItem('access_token'),
          type: 'equip_get_condition',
          data: {
            condition: {
              cid: '',
              equip_cid: '',
              name: '',
              cids: [],
              cid_filter: [],
              brand: '',
              equip_class: '',
              type: ''
            },
            page: {
              page_size: '10',
              page_number: '1'
            }
          }
        },
        // 获取起重机名称
        nameselectTable: {
          access_token: localStorage.getItem('access_token'),
          type: 'equip_get_crane_name'
        },
        // 获取起重机类型
        cranetypeselectTable: {
          access_token: localStorage.getItem('access_token'),
          type: 'equip_get_crane_type'
        },
        //        // 获取起重机分类
        //        classselectTable: {
        //          access_token: 'access_tokenxxxxxxxx',
        //          type: 'equip_get_crane_type'
        //        },
        // 获取起重机品牌
        brandselectTable: {
          access_token: localStorage.getItem('access_token'),
          type: 'equip_get_crane_brand'
        },
        // 获取接口
        equipdetaildata: {
          access_token: localStorage.getItem('access_token'),
          type: 'equip_get_byid',
          id: localStorage.getItem('Cid')
        }
      }
    },
    mounted() {
      this.equipdetail()
      // console.log(this.$route.query.cid)
    },
    methods: {
      handleClose() {
        this.equipPid = ''
        this.equipName = ''
        this.equipType = ''
        this.equipBrand = ''
        this.equipDataTable.data.condition.equip_cid = ''
        this.equipDataTable.data.condition.name = ''
        this.equipDataTable.data.condition.type = ''
        this.equipDataTable.data.condition.brand = ''
        this.dialogTableVisible = false
      },
      // 删除对比
      clearconstrastZeor() {
        this.constrast0 = this.contrastform
        this.bigCarPower0 = ''
        this.bigCarCurrent0 = ''
        this.bigCarSpeed0 = ''
        this.smallCarPower0 = ''
        this.smallCarCurrent0 = ''
        this.smallCarSpeed0 = ''
        this.liftingPower0 = ''
        this.liftingSpeed0 = ''
        this.liftingCurrent0 = ''
        this.liftingWeight0 = ''
        this.picture0 = ''
      },
      clearconstrastOne() {
        this.constrast1 = this.contrastform
        this.bigCarPower1 = ''
        this.bigCarCurrent1 = ''
        this.bigCarSpeed1 = ''
        this.smallCarPower1 = ''
        this.smallCarCurrent1 = ''
        this.smallCarSpeed1 = ''
        this.liftingPower1 = ''
        this.liftingSpeed1 = ''
        this.liftingCurrent1 = ''
        this.liftingWeight1 = ''
        this.picture1 = ''
      },
      clearconstrastTwo() {
        this.constrast2 = this.contrastform
        this.bigCarPower2 = ''
        this.bigCarCurrent2 = ''
        this.bigCarSpeed2 = ''
        this.smallCarPower2 = ''
        this.smallCarCurrent2 = ''
        this.smallCarSpeed2 = ''
        this.liftingPower2 = ''
        this.liftingSpeed2 = ''
        this.liftingCurrent2 = ''
        this.liftingWeight2 = ''
        this.picture2 = ''
      },
      clearconstrastTree() {
        this.constrast3 = this.contrastform
        this.bigCarPower3 = ''
        this.bigCarCurrent3 = ''
        this.bigCarSpeed3 = ''
        this.smallCarPower3 = ''
        this.smallCarCurrent3 = ''
        this.smallCarSpeed3 = ''
        this.liftingPower3 = ''
        this.liftingSpeed3 = ''
        this.liftingCurrent3 = ''
        this.liftingWeight3 = ''
        this.picture3 = ''
      },
      clearconstrastFour() {
        this.constrast4 = this.contrastform
        this.bigCarPower4 = ''
        this.bigCarCurrent4 = ''
        this.bigCarSpeed4 = ''
        this.smallCarPower4 = ''
        this.smallCarCurrent4 = ''
        this.smallCarSpeed4 = ''
        this.liftingPower4 = ''
        this.liftingSpeed4 = ''
        this.liftingCurrent4 = ''
        this.liftingWeight4 = ''
        this.picture4 = ''
      },
      // 选择设备
      toggleRowSelection(row) {
        this.Add = row
        if (row.length > 5) {
          this.btndisable = true
          this.$message({
            type: 'error',
            message: '最多选择5个设备'
          })
        } else {
          this.btndisable = false
        }
        console.log(this.Add)
      },
      toggleRowSelectionAll(row) {
        this.Add = row
        if (row.length > 5) {
          this.$message({
            type: 'error',
            message: '最多选择5个设备'
          })
          this.$refs.contrastTable.clearSelection()
          this.dialogTableVisible = false
        } else {
          this.btndisable = false
        }
        console.log(this.Add)
      },
      // 换页
      handleSizeChange(val) {
        this.siteListQuery.limit = val
        this.gettableData()
      },
      handleCurrentChange(val) {
        this.siteListQuery.page = val
        this.tableData()
      },
      // 弹窗
      showDialog() {
        this.dialogTableVisible = true
        //        if (this.constrast0.cid === undefined || this.constrast1.cid === undefined || this.constrast2.cid === undefined || this.constrast3.cid === undefined || this.constrast4.cid === undefined) {
        //          this.equipDataTable.data.condition.cids = []
        //        } else {
        //          this.numcids = [this.constrast.cid, this.constrast0.cid, this.constrast1.cid, this.constrast2.cid, this.constrast3.cid, this.constrast4.cid]
        //          this.equipDataTable.data.condition.cids = this.numcids
        //        }
        this.cidfilter = [this.constrast.cid, this.constrast0.cid, this.constrast1.cid, this.constrast2.cid, this.constrast3.cid, this.constrast4.cid]
        this.equipDataTable.data.condition.cid_filter = this.cidfilter
        console.log(this.constrast0.cid)
        this.equipData()
        this.cranetypeselect()
        this.nameselect()
        this.brandselect()
      },
      // 取消添加设备
      cancelAdd() {
        this.handleClose()
      },
      // 确认添加设备
      confirmAdd() {
        this.equipAdd = this.Add
        console.log(this.equipAdd)
        for (var i = 0; i < 6; i++) {
          if (this.equipAdd[i] === undefined) {
            this.equipAdd[i] = this.contrastform
            this.constrast0 = this.equipAdd[0]
            this.constrast1 = this.equipAdd[1]
            this.constrast2 = this.equipAdd[2]
            this.constrast3 = this.equipAdd[3]
            this.constrast4 = this.equipAdd[4]
          }
        }
        if (this.constrast0.attachment.length === 0) {
          var showpicture0 = ''
        } else {
          var path0 = this.constrast0.attachment[0].path
          showpicture0 = Axios.defaults.baseURL + '/' + path0
        }
        this.picture0 = showpicture0
        if (this.constrast1.attachment.length === 0) {
          var showpicture1 = ''
        } else {
          var path1 = this.constrast1.attachment[0].path
          showpicture1 = Axios.defaults.baseURL + '/' + path1
        }
        this.picture1 = showpicture1
        if (this.constrast2.attachment.length === 0) {
          var showpicture2 = ''
        } else {
          var path2 = this.constrast2.attachment[0].path
          showpicture2 = Axios.defaults.baseURL + '/' + path2
        }
        this.picture2 = showpicture2
        if (this.constrast3.attachment.length === 0) {
          var showpicture3 = ''
        } else {
          var path3 = this.constrast3.attachment[0].path
          showpicture3 = Axios.defaults.baseURL + '/' + path3
        }
        this.picture3 = showpicture3
        if (this.constrast4.attachment.length === 0) {
          var showpicture4 = ''
        } else {
          var path4 = this.constrast4.attachment[0].path
          showpicture4 = Axios.defaults.baseURL + '/' + path4
        }
        this.picture4 = showpicture4
        var bigpower0 = this.constrast0.big_car_rated[0].power
        var bigcurrent0 = this.constrast0.big_car_rated[0].current
        var bigspeed0 = this.constrast0.big_car_rated[0].speed
        this.bigCarSpeed0 = bigspeed0
        this.bigCarPower0 = bigpower0
        this.bigCarCurrent0 = bigcurrent0
        var smallpower0 = this.constrast0.small_car_rated[0].power
        var smallcurrent0 = this.constrast0.small_car_rated[0].current
        var smallspeed0 = this.constrast0.small_car_rated[0].speed
        this.smallCarSpeed0 = smallspeed0
        this.smallCarPower0 = smallpower0
        this.smallCarCurrent0 = smallcurrent0
        var bigpower1 = this.constrast1.big_car_rated[0].power
        var bigcurrent1 = this.constrast1.big_car_rated[0].current
        var bigspeed1 = this.constrast1.big_car_rated[0].speed
        this.bigCarSpeed1 = bigspeed1
        this.bigCarPower1 = bigpower1
        this.bigCarCurrent1 = bigcurrent1
        var smallpower1 = this.constrast1.small_car_rated[0].power
        var smallcurrent1 = this.constrast1.small_car_rated[0].current
        var smallspeed1 = this.constrast1.small_car_rated[0].speed
        this.smallCarSpeed1 = smallspeed1
        this.smallCarPower1 = smallpower1
        this.smallCarCurrent1 = smallcurrent1
        var bigpower2 = this.constrast2.big_car_rated[0].power
        var bigcurrent2 = this.constrast2.big_car_rated[0].current
        var bigspeed2 = this.constrast2.big_car_rated[0].speed
        this.bigCarSpeed2 = bigspeed2
        this.bigCarPower2 = bigpower2
        this.bigCarCurrent2 = bigcurrent2
        var smallpower2 = this.constrast2.small_car_rated[0].power
        var smallcurrent2 = this.constrast2.small_car_rated[0].current
        var smallspeed2 = this.constrast2.small_car_rated[0].speed
        this.smallCarSpeed2 = smallspeed2
        this.smallCarPower2 = smallpower2
        this.smallCarCurrent2 = smallcurrent2
        var bigpower3 = this.constrast3.big_car_rated[0].power
        var bigcurrent3 = this.constrast3.big_car_rated[0].current
        var bigspeed3 = this.constrast3.big_car_rated[0].speed
        this.bigCarSpeed3 = bigspeed3
        this.bigCarPower3 = bigpower3
        this.bigCarCurrent3 = bigcurrent3
        var smallpower3 = this.constrast3.small_car_rated[0].power
        var smallcurrent3 = this.constrast3.small_car_rated[0].current
        var smallspeed3 = this.constrast3.small_car_rated[0].speed
        this.smallCarSpeed3 = smallspeed3
        this.smallCarPower3 = smallpower3
        this.smallCarCurrent3 = smallcurrent3
        var bigpower4 = this.constrast4.big_car_rated[0].power
        var bigcurrent4 = this.constrast4.big_car_rated[0].current
        var bigspeed4 = this.constrast4.big_car_rated[0].speed
        this.bigCarSpeed4 = bigspeed4
        this.bigCarPower4 = bigpower4
        this.bigCarCurrent4 = bigcurrent4
        var smallpower4 = this.constrast4.small_car_rated[0].power
        var smallcurrent4 = this.constrast4.small_car_rated[0].current
        var smallspeed4 = this.constrast4.small_car_rated[0].speed
        this.smallCarSpeed4 = smallspeed4
        this.smallCarPower4 = smallpower4
        this.smallCarCurrent4 = smallcurrent4
        var liftingpower0 = this.constrast0.lifting_rated[0].power
        var liftingcurrent0 = this.constrast0.lifting_rated[0].current
        var liftingspeed0 = this.constrast0.lifting_rated[0].speed
        var liftingweight0 = this.constrast0.lifting_rated[0].weight
        this.liftingPower0 = liftingpower0
        this.liftingCurrent0 = liftingcurrent0
        this.liftingSpeed0 = liftingspeed0
        this.liftingWeight0 = liftingweight0
        var liftingpower1 = this.constrast1.lifting_rated[0].power
        var liftingcurrent1 = this.constrast1.lifting_rated[0].current
        var liftingspeed1 = this.constrast1.lifting_rated[0].speed
        var liftingweight1 = this.constrast1.lifting_rated[0].weight
        this.liftingPower1 = liftingpower1
        this.liftingCurrent1 = liftingcurrent1
        this.liftingSpeed1 = liftingspeed1
        this.liftingWeight1 = liftingweight1
        var liftingpower2 = this.constrast2.lifting_rated[0].power
        var liftingcurrent2 = this.constrast2.lifting_rated[0].current
        var liftingspeed2 = this.constrast2.lifting_rated[0].speed
        var liftingweight2 = this.constrast2.lifting_rated[0].weight
        this.liftingPower2 = liftingpower2
        this.liftingCurrent2 = liftingcurrent2
        this.liftingSpeed2 = liftingspeed2
        this.liftingWeight2 = liftingweight2
        var liftingpower3 = this.constrast3.lifting_rated[0].power
        var liftingcurrent3 = this.constrast3.lifting_rated[0].current
        var liftingspeed3 = this.constrast3.lifting_rated[0].speed
        var liftingweight3 = this.constrast3.lifting_rated[0].weight
        this.liftingPower3 = liftingpower3
        this.liftingCurrent3 = liftingcurrent3
        this.liftingSpeed3 = liftingspeed3
        this.liftingWeight3 = liftingweight3
        var liftingpower4 = this.constrast4.lifting_rated[0].power
        var liftingcurrent4 = this.constrast4.lifting_rated[0].current
        var liftingspeed4 = this.constrast4.lifting_rated[0].speed
        var liftingweight4 = this.constrast4.lifting_rated[0].weight
        this.liftingPower4 = liftingpower4
        this.liftingCurrent4 = liftingcurrent4
        this.liftingSpeed4 = liftingspeed4
        this.liftingWeight4 = liftingweight4
        this.dialogTableVisible = false
        console.log(this.equipAdd)
      },
      // 查询条件
      equipSearch() {
        this.equipDataTable.data.condition.equip_cid = this.equipPid
        this.equipDataTable.data.condition.name = this.equipName
        this.equipDataTable.data.condition.type = this.equipType
        this.equipDataTable.data.condition.brand = this.equipBrand
        this.equipData()
      },
      // 查看接口
      equipdetail() {
        axios.post('/equipmanage', this.equipdetaildata, {
          headers: {
            'Content-Type': 'application/x-www-form-urlencoded'
          }
        }).then((res) => {
          this.constrast = res.data.data
          if (res.data.data.attachment.length === 0) {
            var showpicture = Axios.defaults.baseURL + '/' + this.contrastform.attachment[0].path
          } else {
            var path = res.data.data.attachment[0].path
            showpicture = Axios.defaults.baseURL + '/' + path
          }
          this.picture = showpicture
          var bigpower = res.data.data.big_car_rated[0].power
          var bigcurrent = res.data.data.big_car_rated[0].current
          var bigspeed = res.data.data.big_car_rated[0].speed
          this.bigCarSpeed = bigspeed
          this.bigCarPower = bigpower
          this.bigCarCurrent = bigcurrent
          var smallpower = res.data.data.small_car_rated[0].power
          var smallcurrent = res.data.data.small_car_rated[0].current
          var smallspeed = res.data.data.small_car_rated[0].speed
          this.smallCarPower = smallpower
          this.smallCarCurrent = smallcurrent
          this.smallCarSpeed = smallspeed
          var liftingpower = res.data.data.lifting_rated[0].power
          var liftingcurrent = res.data.data.lifting_rated[0].current
          var liftingspeed = res.data.data.lifting_rated[0].speed
          var liftingweight = res.data.data.lifting_rated[0].weight
          this.liftingPower = liftingpower
          this.liftingCurrent = liftingcurrent
          this.liftingSpeed = liftingspeed
          this.liftingWeight = liftingweight
          console.log(res)
        })
          .catch(function(error) {
            console.log(error)
          })
      },
      // 获取起重机名称
      nameselect() {
        axios.post('/basicdata', this.nameselectTable, {
          headers: {
            'Content-Type': 'application/x-www-form-urlencoded'
          }
        }).then((res) => {
          this.nameoptions = res.data.datas
          console.log(res.data.datas)
        })
          .catch(function(error) {
            console.log(error)
          })
      },
      // 获取起重机分类
      cranetypeselect() {
        axios.post('/basicdata', this.cranetypeselectTable, {
          headers: {
            'Content-Type': 'application/x-www-form-urlencoded'
          }
        }).then((res) => {
          this.cranetypeoptions = res.data.datas
          console.log(res.data.datas)
        })
          .catch(function(error) {
            console.log(error)
          })
      },
      // 获取起重机分类
      //      classselect() {
      //        axios.post('/basicdata', this.classselectTable, {
      //          headers: {
      //            'Content-Type': 'application/x-www-form-urlencoded'
      //          }
      //        }).then((res) => {
      //          this.classoptions = res.data.datas
      //        })
      //          .catch(function(error) {
      //            console.log(error)
      //          })
      //      },
      // 获取起重机品牌
      brandselect() {
        axios.post('/basicdata', this.brandselectTable, {
          headers: {
            'Content-Type': 'application/x-www-form-urlencoded'
          }
        }).then((res) => {
          this.brandoptions = res.data.datas
        })
          .catch(function(error) {
            console.log(error)
          })
      },
      // 总览接口
      equipData() {
        axios.post('/equipmanage', this.equipDataTable, {
          headers: {
            'Content-Type': 'application/x-www-form-urlencoded'
          }
        }).then((res) => {
          this.tableData = res.data.data.items
          this.total = parseInt(res.data.data.page.total)
          // console.log(this.tableData)
          console.log(res)
        })
          .catch(function(error) {
            console.log(error)
          })
      },
      // 返回主页
      goBack() {
        this.$router.push({ path: '/monitor/iots' })
      },
      handleClick(tab, event) {
        console.log(tab, event)
      },
      // 当前页
      CurrentChange(val) {
        this.equipDataTable.data.page.page_number = (val) + ''
        this.equipData()
      },
      // 每页显示多少条
      SizeChange(pageSize) {
        this.equipDataTable.data.page.page_size = (pageSize) + ''
        this.equipData()
      },
      toJSON() {}
    }
  }
</script>
